<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<script src="resources/js/paging/paging.js"></script>
<script type="text/javascript">
$(function() {
	setPage({
		page: $("#pageNum").val(),
		totalCount: $("#totalCount").val(),
		naviId: "naviPage",
		funcName: "getAskList",
		pageSize: pageSize
	});
});
</script>

</head>
<body>

<input type="hidden" id="pageNum" value="${pageNum }"/>
<input type="hidden" id="totalCount" value="${totalCount }"/>

<table class="list" cellpadding="7" cellspacing="0" style="width:100%;text-align:center;">
	<tr class="table_title">
		<td>No.</td>
		<td>날짜</td>
		<td>ID</td>
		<td>분류</td>
		<td>E-mail</td>
		<td>내용 보기</td>
		<td>답변</td>
	</tr>
	
<c:if test="${fn:length(resultList) > 0 }">
	<c:forEach var="list" items="${resultList }">
		<tr>
			<td>${list.ask_no }</td>
			<td>${list.regdate }</td>
			<td>${list.user_id }</td>
			<td>${list.type }</td>
			<td>${list.email }</td>
			<td><a onclick="javascript:window.open('./ask_detailContents.ga?ask_no=${list.ask_no }', 'ask', 'width=500,height=600')">내용 보기</a></td>
			<td>
				<c:if test="${list.reply == null }">미완료</c:if>
				<c:if test="${list.reply != null }">완료</c:if>
			</td>
		</tr>
	</c:forEach>
</c:if>
<c:if test="${fn:length(resultList) <= 0 }">
	<tr style="height:350px;">
		<td colspan="7">리스트가 없습니다.</td>
	</tr>
</c:if>
	
</table>
<br/><br/>

<c:if test="${fn:length(resultList) > 0 }">
<div id="naviPage" style="text-align:center;"></div>
</c:if>

</body>
</html>